Carbon


SndAddModifier

Header: Sound.h Carbon status: Unsupported

Links modifiers to sound channels.

OSErr SndAddModifier (
    SndChannelPtr chan, 
    Ptr modifier, 
    SInt16 id, 
    SInt32 init
);
Parameter descriptions
chan

A pointer to a valid sound channel.

modifier

A pointer to a modifier function to be added to the sound channel specified by chan. This field is obsolete.

id

The resource ID of the modifier to be linked to the sound channel.

init

The initialization parameters for the sound channel specified by chan.

function result

A result code.

DISCUSSION

Early versions of the Sound Manager allowed application developers to use modifiers to alter sound commands before being processed by the Sound Manager. The Sound Manager no longer supports this capability. SndAddModifier is documented here for completeness only.

The SndAddModifier function installs a modifier into an open channel specified in the chan parameter. The modifier parameter should be NULL, and the id parameter is the resource ID of the modifier to be linked to the sound channel. SndAddModifier causes the Sound Manager to load the specified 'snth' resource, lock it in memory, and link it to the channel specified.

The SndAddModifier function is for internal Sound Manager use only. You should not call it in your application.

The only supported use of the SndAddModifier function is to change the data type associated with a sound channel. For example, you can pass the constant sampledSynth in the id parameter to reconfigure a sound channel for sampled-sound data. You should, however, set a sound channel’s data type when you call SndNewChannel, not by calling SndAddModifier.

To modify sampled-sound data immediately before the Sound Manager plays it, you can customize double buffering functions so that your application can modify sampled-sound data when it fills a buffer of sound data for the Sound Manager to play.

To change the initialization options for a sound channel, you can use the reInitCmd command. For a description of that command, see “Sound Command Numbers A”.

SPECIAL CONSIDERATIONS

You should not use the SndAddModifier function.

AVAILABILITY

Not supported in Carbon. Not available in Carbon.

CARBON NOTES

This function simply returns noErr, and is not supported in Carbon. As explained in Inside Macintosh: Sound (page 2-150), SndAddModifier should not be called by applications.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)